<template>
  <div class="box">
    {{ count }}

    <button class="btn" @click="addFn">add</button>
  </div>
</template>

<script>
import { ref } from "vue";
export default {
  setup() {
    const count = ref(0);

    const addFn = () => count.value++;

    return {
      count,
      addFn,
    };
  },
};
</script>

<style>
.box {
  width: 200px;
  height: 200px;
  background-color: red;
}
.btn {
  width: 50px;
  height: 30px;
  color: skyblue;
  font-size: 18px;
}
</style>
